package org.example.fancystudy.aqs;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @author chaigq
 * @version 1.0
 * @date 2023/3/10 14:31
 */
public class AQSDemo {


    public static void main(String[] args) {
//        new CountDownLatch(10);
//        ReentrantLock reentrantLock = new ReentrantLock();
//        ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock();
//        Semaphore semaphore = new Semaphore(1);
//
//        Lock lock = new ReentrantLock();
//        Lock lock2 = new ReentrantLock(true);




        System.out.println(getDate8String());


    }

    public static String getDate8String() {
        return getDate8String(new Date());
    }
    public static String getDate8String(Date date) {
        return new SimpleDateFormat("yyyyMMdd").format(date);
    }
}
